package com.taotao.portal.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.taotao.portal.service.CartService;

/**
 * @Description:
 * @Author:fu.cc
 * @Company:neusoft
 * @CreateDate:2016年12月1日下午3:04:40
 */
@Controller
public class CartNumController {
	@Autowired
	private CartService cartService;

	@RequestMapping("/service/cart/update/num/{itemId}/{num}")
	public String changeCartItemNum(@PathVariable Long itemId, @PathVariable Integer num, HttpServletRequest request,
			HttpServletResponse response) {
		cartService.changeCartItemNum(itemId, num, request, response);
		return "redirect:/cart/cart.html";
	}
}
